﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using System.Web.Routing;

namespace JSC.Portal.Web
{
    public class PortalViewEngine : WebFormViewEngine
    {
        public PortalViewEngine() : base()
        {
            MasterLocationFormats = new[] { 
                "~/Views/{1}/{0}.master", 
                "~/Views/Shared/{0}.master" 
            };
            ViewLocationFormats = new[] { 
                "~/Views/Shared/{0}.aspx",
                "~/Views/Shared/{0}.ascx",
                "~/Views/Portal/{1}/{0}.aspx",
                "~/Views/Portal/{1}/{0}.ascx",
                /* Module locations */
                "~/Modules/{1}/Views/{0}.aspx", 
                "~/Modules/{1}/Views/{0}.ascx", 
                "~/Modules/Views/Shared/{0}.aspx", 
                "~/Modules/Views/Shared/{0}.ascx" 
            };
            PartialViewLocationFormats = ViewLocationFormats;
        }
    }
}